Next: CSS support, Previous: Math formatting in HTML export, Up: HTML export [Contents][Index]
An alternative way to publish literal code examples in HTML is
to use text areas, where the example can even be edited before
pasting it into an application. It is triggered by
:textarea attribute at an example or
src block.
You may also use :height and :width
attributes to specify the height and width of the text area,
which default to the number of lines in the example, and 80,
respectively. For example
#+ATTR_HTML: :textarea t :width 40
#+BEGIN_EXAMPLE
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
#+END_EXAMPLE